
import {simpleServer} from '@/tools/servers'

/**
 * 商家注册
 */
export class BusinessRegistrationService {
    // 分页查询列表
    static findBusinessRegistrations (pageDTO) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.findBusinessRegistrations,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/BusinessRegistration/findBusinessRegistrations', body);
    }


    //根据商家注册Id查询商家注册
    static findBusinessRegistration (businessRegistrationId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findBusinessRegistration ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/BusinessRegistration/findBusinessRegistration',body);
    }


    //为了编辑,根据商家注册Id查询商家注册
    static findBusinessRegistrationForEdit(businessRegistrationId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findBusinessRegistrationForEdit ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/BusinessRegistration/findBusinessRegistrationForEdit',body);
    }

    //为了查看,根据商家注册Id查询商家注册，所有外键字段的名称都已加载
    static findBusinessRegistrationForView(businessRegistrationId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findBusinessRegistrationForView ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/BusinessRegistration/findBusinessRegistrationForView',body);
    }

    //创建新的商家注册
    static createBusinessRegistration() {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.createBusinessRegistration,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/BusinessRegistration/createBusinessRegistration',body);
    }

    //保存商家注册
    static saveBusinessRegistration(businessRegistration) {
        var httpMethod = 'POST'
        var body = simpleServer.getArgs(this.saveBusinessRegistration,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/BusinessRegistration/saveBusinessRegistration', body);
    }

    //编辑商家注册
    static updateBusinessRegistration (businessRegistration) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.updateBusinessRegistration,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/BusinessRegistration/updateBusinessRegistration', body);
    }

    //根据商家注册Id删除商家注册
    static deleteBusinessRegistration (businessRegistrationId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.deleteBusinessRegistration,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/BusinessRegistration/deleteBusinessRegistration',body);
    }

    //为了查看,根据商家注册Id查询商家注册，只加载ID 和 名称
    static findBusinessRegistrationsWithIdNameById(businessRegistrationId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findBusinessRegistrationsWithIdNameById ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/BusinessRegistration/findBusinessRegistrationsWithIdNameById',body);
    }

    //为了查看,根据商家注册 名称 查询商家注册，只加载ID 和 名称
    static findBusinessRegistrationsWithIdNameByName(businessRegistrationName) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findBusinessRegistrationsWithIdNameByName ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/businessRegistration/BusinessRegistration/findBusinessRegistrationsWithIdNameByName',body);
    }

    //查看所有商家注册审核信息
    static findAllBusinessRegistrations(){
      var httpMethod = 'GET';
      var body = simpleServer.getArgs(this.findAllBusinessRegistrations ,arguments,'GET');
      return simpleServer.connection(httpMethod, '/simple/businessRegistration/BusinessRegistration/findAllBusinessRegistrations',body);
    }


}
